<div class="results index">

<?php
	print_r($u1);
    echo '<strong><br>There are '.count($u1).' influential users<br></strong>';
    print_r($u2);
    echo '<strong><br>There are '.count($u2).' influenced users<br></strong>';
	$paginator->options(array('url'=>$this->passedArgs));
echo $paginator->counter(array(
'format' => 'There are %count% rows- Page %page%/%pages%'
));
?>
	<h2><?php __('Results');?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('User','u1');?></th>
			<th><?php echo $this->Paginator->sort('Influenced user','u2');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($r as $result):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $result['Result']['u1']; ?>&nbsp;</td>
		<td><?php echo $result['Result']['u2']; ?>&nbsp;</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>

<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('Do another experiment', true), array('action' => 'testl'));?></li>
        <li><?php echo $this->Html->link(__('Find influential Users', true), array('controller'=>'expmaxs','action' => 'maxinf_Location',$r[0]['Result']['test_id']));?></li>
	</ul>
</div>